package com.wu.pmo.controller;

import com.wu.pmo.entity.Employees;
import com.wu.pmo.mapper.EmployeesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/api")
public class EmployeesController {

    @Autowired
    private EmployeesMapper employeesMapper;


    @GetMapping("/employees")
    public List<Employees> getAllEmployees() {
        return employeesMapper.selectList(null);
    }
}